import { ApiCall } from "tsrpc";
import { roomServer } from "../..";
import { ReqCreateRoom, ResCreateRoom } from "../../shared/protocols/room/PtlCreateRoom";

export async function ApiCreateRoom(call: ApiCall<ReqCreateRoom, ResCreateRoom>) {
    let ret = roomServer.createRoom();
    call.succ({
        roomId: ret.state.id
    })
}